p2p_and_gnutella_protocolfandomcom-20200213-history
P2P and Gnutella Protocol Wiki
P2P Service (Peer-to-Peer) It is It is a type of networking that allows users with the same networking program to connect with each other and directly access each other’s files. Both parties should have the same communication capability and both can initiate a communication session. P2P is a huge help in companies as it makes work load and tasks easier to handle and consume less time. ' History Of P2P' Peer-to-peer file sharing became popular in 1999 with the introduction of Napster, a file sharing application and a set of central servers that linked people who had files with those who requested files. The central index server indexed the users and their shared content. When someone searched for a file, the server searched all available copies of that file and present them to the user. The files would be transferred directly between the two private computers. A limitation was that only music files could be shared. Because this process occurred on a central server, however, Napster was held liable for copyright infringement and shut down in July 2001. It later reopened as a pay service. After Napster was shut down, the most popular peer-to-peer services were Gnutella and Kazaa. These services also allowed users to download files other than music, such as movies and games. ''' Centralized Framework *First generation P2P utilizes the server-client network structure. The centralized server acts as a sort of “traffic cop,” *The central server maintains directories of shared files stored on each node. Each time a client logs on or off the network, the directory is updated. In this model, all control and search messages are sent to a central server. The central server then cross-references the client’s search request with its directory database and displays any matches to the requesting client. Once informed about a match, the client contacts the peer directly and downloads the requested file. *The centralized P2P framework provides the highest performance when it comes to locating files. Every individual peer in the network must be registered, which ensures that all searches are comprehensive and execute quickly and efficiently. Decentralized Framework' ' ' *Second generation P2P uses a distributed model where there is no central server and every node has equal status. In order to share files using the Gnutella protocol, the user requires a networked computer, (“Node X”), equipped with a Gnutella software program. '''Node X '''initiates a query by forwarding a request to another computer on the Gnutella network (“Node Y”). '''Node Y' then forwards the query to everyone that it is connected to. -A decentralized framework does not rely on a central server form of prolonged search times. An outgoing search request may need to travel through thousands of users before any results are identified Controlled Decentralized Framework *Third generation P2P employs a hybrid of the central-server and fully decentralized frameworks. Within this hybrid model, certain nodes in the network are elected ‘super-nodes’ or ‘ultrapeers’ and act as traffic cops for the other nodes. The super-nodes change dynamically as bandwidth and the network topology change. *In the controlled decentralization framework, each node forwards a list of its shared files to its super-node (“Node Y”). Search requests are directed to the appropriate Node Y, which will then forward the request to other super-nodes. When a match is found, the requesting node, or Node X, connects directly to the node with the match, Node Z, and downloads the file. The future for P2P lies in its ability to change the internet and form it anew. By allowing users that are accessing data from a particular site to retrieve the copy of the data from a close point to where the person is currently at. 'Gnutella' * In networking a lot of terms can be used to described one computers interconnection with the other or at least what task it can do. One is the Gnutella that provides a simple reliable distribution system that delivers knowledge, literature, art and music to all. It doesn’t need subsidies, has no central servers and the network is peers based who co-operate to make a library of digital content. Some feel that this Gnutella is a threat to the market as people in the good old days had to save up to buy things and collectibles but through the innovation of this protocol people are able to that with just the use of the net. History Of Gnutella *The first client was developed by Justin Frankel, Gianluca Rubinacci and Tom Pepper of Nullsoft in early 2000, soon after the company's acquisition by AOL. On March 14, the program was made available for download on Nullsoft's servers. The event was prematurely announced on Slashdot, and thousands downloaded the program that day. The source code was to be released later, under the GNU General Public License (GPL). *The next day, AOL stopped the availability of the program over legal concerns and restrained Nullsoft from doing any further work on the project. This did not stop gnutella; after a few days, the protocol had been reverse engineered, and compatible free and open source clones began to appear. This parallel development of different clients by different groups remains the modus operandi of gnutella development today. *The gnutella network is a fully distributed alternative to such semi-centralized systems as FastTrack (KaZaA) and the original Napster. Initial popularity of the network was spurred on by Napster's threatened legal demise in early 2001. This growing surge in popularity revealed the limits of the initial protocol's scalability. In early 2001, variations on the protocol (first implemented in proprietary and closed sourceclients) allowed an improvement in scalability. Instead of treating every user as client and server, some users were now treated as ultrapeers, routing search requests and responses for users connected to them. 'Searching a Gnutella Network: Broadcasting' * Searching in Gnutella involves broadcasting a Query message to all connected peers. Each connected peer will send it to their connected peers (say 3) and so on. Typically, this search will run 7 hops. If the number of connected peers, c=3 and the hops TTL=7 then the total number of peers searched (in a fully connected network) will be: S = c + c2 +c3 + ….. ch = 3 + 9 + 27 + 81 + 243 + 729 + 2187 = 3279 Nodes '5 Descriptor Types' *'Ping': used to actively discover hosts on the network. *'Pong': the response to a Ping.(note:A servent receiving a Ping descriptor is expected to respond with one or more Pong descriptors. * Query: the primary mechanism for searching the distributed network. A servent receiving a Query descriptor will respond with a Query Hit if a match is found against its local data set. * Query Hit: the response to a Query: contains IP address, GUID and search results. * Push: allows downloading from firewalled servents. ' Gnutella Descriptor Head' *'Descriptor ID': a unique identifier for the descriptor on the network (16-byte string). *'Payload Descriptor': 0x00 = Ping: 0x01 = Pong: 0x40 = Push: 0x80 = Query: 0x81 = Query Hit. *'TTL': Time To Live or Horizon. Each servent decrements the TTL before passing it on - when TTL = 0, it is no longer forwarded. *'Hops': counts the number of hops the descriptor has traveled i.e. hops = initial TTL when TTL expires. *'Payload Length': next descriptor header is located exactly Payload Length bytes from end descriptor header. 'Gnutella Payload 2-Pong' *'Port': port which responding host can accept incoming connections. *'IP Address': IP address of the responding host. *'Number of Files Shared': number of files responding host is sharing on the network. *'Number of Kilobytes Shared': kilobytes of data responding host is sharing on the network. Gnutella Payload 3-Query *'Minimum Speed': minimum speed (in kb/second) of servents that should respond to this message. A Servent receiving a Query descriptor with a minimum speed field of n kb/s should only respond with a QueryHit if it is able to communicate at a speed >=n kb/s *'Search Criteria': A nul terminated search string the maximum length is bound by Payload_Length field of the descriptor header. Gnutella Payload 4-QueryHit * Number of Hits: number of query hits in the result set. * Port: 'port which the responding host can accept incoming connections. *'IP Address: IP address of the responding host (big-endian). *'Speed': speed (in kb/second) of the responding host. *'Result Set': set of Number_of_Hits responses to the corresponding Query with the following structures: : File Index: ID of file matching the corresponding query - assigned by the responding host : File Size: size (bytes) of this file : File Name: name of the file *'Servent Identifier': servent network ID (16-byte string), typically function of servent’s network address - instrumental in the operation of the Push Descriptor. Gnutella Payload 5-Push *''''''Servent Identifier: target servent network ID (16-byte string) requested to push file (with given index File_Index). *'File Index': ID of the file to be pushed from the target servent. *'IP Address': IP address of target host which file should be pushed *'''Port: '''port on target host which file should be pushed * References http://rfc-gnutella.sourceforge.net/ http://en.wikipedia.org/wiki/Peer-to-peer_file_sharing#History http://en.wikipedia.org/wiki/Gnutella http://users.cs.cf.ac.uk/Ian.J.Taylor/cmt202/3-gnutella.pdf http://downloads.lightreading.com/wplib/sandvine/P2P.pdf Group Members Dacanay, Precious Elizabeth McCann, Jonathan Cabading, Ragi Mandigma, Jasmyn Sara Yson, Rizelle Sanchez, Jefferey Category:Browse